<template>
    <view class="s-list adivce-wrap">
        <Header title="建议与反馈" :leftIconSize="20"></Header>
        <view class='s-list-main'>
            <!-- 表单 -->
            <view class='li-form'>
                <uv-form labelPosition="left" :model="formData" ref="rForm" :rules="rules">
                    <view class="form-top-tit">
                        <view class="form-tit-text">
                            <text class="red-star">*</text>
                            简要的补充，帮助我们快速定位问题
                        </view>
                    </view>
                    <uv-textarea v-model="formData.content" count placeholder="请输入10个字以上的问题描述，以便我们提供更好的服务。"
                                 border="none" height='100' maxlength="200"></uv-textarea>
                    <view class="form-top-tit">
                        <view class="form-tit-text">上传凭证</view>
                        <view class="tip-text">{{ parentImageList.length }}/3</view>
                    </view>
                    <fileUpload :parentImageList="parentImageList" :maxCount=3></fileUpload>
                </uv-form>
            </view>
            <!-- 表单-end -->
        </view>
        <!-- 底部按钮 -->
        <view class='s-btn-common'>
            <uv-button type="primary" text="确认" @click="formSubmit"></uv-button>
        </view>
    </view>
</template>

<script setup>
    import {ref,reactive} from 'vue';
    let formData = reactive({
        id: "",
        content: "",
    });
    let parentImageList=ref([{}])
    let rules = reactive({
        content: {
            type: 'string',
            required: true,
            message: '请输入检查项内容',
            trigger: ['change']
        },
    });
    let rForm = ref();
    //确认提交
    const formSubmit = () => {
        //走自己逻辑，此处省略
        uni.showToast({
            title: '保存成功',
            icon: 'success',
            duration: 2000
        })
    }


</script>

<style scoped>

</style>
